/*******************************************************************************
 * Size: 15 px
 * Bpp: 4
 * Opts: 
 ******************************************************************************/

#ifdef LV_LVGL_H_INCLUDE_SIMPLE
#include "lvgl.h"
#else
#include "lvgl/lvgl.h"
#endif

#ifndef LV_FONT_TEST
#define LV_FONT_TEST 1
#endif

#if LV_FONT_TEST

/*-----------------
 *    BITMAPS
 *----------------*/

/*Store the image of the glyphs*/
static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
    /* U+4E0B "下" */
    0x2c, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x22,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf3, 0x0,
    0x0, 0x0, 0xcf, 0x20, 0x0, 0x0, 0x0, 0x0,
    0x0, 0xc, 0xf2, 0x0, 0x0, 0x0, 0x0, 0x0,
    0x0, 0xcf, 0xd6, 0x0, 0x0, 0x0, 0x0, 0x0,
    0xc, 0xff, 0xfd, 0x40, 0x0, 0x0, 0x0, 0x0,
    0xcf, 0x5c, 0xff, 0xa1, 0x0, 0x0, 0x0, 0xc,
    0xf2, 0x6, 0xff, 0x40, 0x0, 0x0, 0x0, 0xcf,
    0x20, 0x2, 0x50, 0x0, 0x0, 0x0, 0xc, 0xf2,
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xcf, 0x20,
    0x0, 0x0, 0x0, 0x0, 0x0, 0xc, 0xf2, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x0, 0xcf, 0x20, 0x0,
    0x0, 0x0,

    /* U+4E2A "个" */
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
    0x0, 0x0, 0x2, 0xd6, 0x0, 0x0, 0x0, 0x0,
    0x0, 0x0, 0xdf, 0xa0, 0x0, 0x0, 0x0, 0x0,
    0x1, 0xcf, 0xff, 0x90, 0x0, 0x0, 0x0, 0x4,
    0xef, 0xa2, 0xdf, 0xc1, 0x0, 0x0, 0x2a, 0xff,
    0x92, 0x22, 0xcf, 0xf7, 0x0, 0x7f, 0xff, 0x60,
    0xaf, 0x30, 0x9f, 0xfe, 0x20, 0xea, 0x10, 0xa,
    0xf3, 0x0, 0x4c, 0x90, 0x0, 0x0, 0x0, 0xaf,
    0x30, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0xf3,
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xaf, 0x30,
    0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0xf3, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x0, 0xaf, 0x30, 0x0,
    0x0, 0x0, 0x0, 0x0, 0xa, 0xf3, 0x0, 0x0,
    0x0, 0x0, 0x0, 0x0, 0xaf, 0x30, 0x0, 0x0,
    0x0,

    /* U+4E5D "九" */
    0x0, 0x0, 0x1f, 0xe0, 0x0, 0x0, 0x0, 0x0,
    0x0, 0x1, 0xfe, 0x0, 0x0, 0x0, 0x0, 0x0,
    0x0, 0x1f, 0xe0, 0x0, 0x0, 0x0, 0x0, 0xab,
    0xbb, 0xff, 0xbb, 0xbb, 0x0, 0x0, 0xf, 0xff,
    0xff, 0xff, 0xff, 0xf1, 0x0, 0x0, 0x0, 0x5,
    0xfa, 0x0, 0xcf, 0x10, 0x0, 0x0, 0x0, 0x7f,
    0x70, 0xc, 0xf1, 0x0, 0x0, 0x0, 0xa, 0xf4,
    0x0, 0xcf, 0x10, 0x0, 0x0, 0x0, 0xff, 0x10,
    0xc, 0xf1, 0x0, 0x0, 0x0, 0x6f, 0xa0, 0x0,
    0xcf, 0x10, 0x0, 0x0, 0x1e, 0xf4, 0x0, 0xc,
    0xf1, 0xe, 0x60, 0xb, 0xfa, 0x0, 0x0, 0xcf,
    0x10, 0xf9, 0x1c, 0xfe, 0x10, 0x0, 0xb, 0xfc,
    0xcf, 0x60, 0xad, 0x20, 0x0, 0x0, 0x4e, 0xff,
    0xc1, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0,
    0x0,

    /* U+51B7 "冷" */
    0x0, 0x0, 0x0, 0x0, 0x57, 0x10, 0x0, 0x2,
    0xb6, 0x0, 0x0, 0x1e, 0xf5, 0x0, 0x0, 0xe,
    0xf1, 0x0, 0xb, 0xff, 0xe1, 0x0, 0x0, 0x6f,
    0x90, 0x9, 0xfc, 0x4f, 0xd1, 0x0, 0x0, 0xed,
    0x1a, 0xfd, 0x31, 0x7f, 0xe3, 0x0, 0x2, 0x2e,
    0xfd, 0x3e, 0xd1, 0x8f, 0xf4, 0x0, 0x0, 0x9a,
    0x0, 0x5e, 0x40, 0x7a, 0x0, 0x3, 0x10, 0x7b,
    0xbb, 0xcb, 0xba, 0x20, 0x0, 0xcf, 0x1a, 0xff,
    0xff, 0xff, 0xf5, 0x0, 0x2f, 0xc0, 0x0, 0x0,
    0x9, 0xfa, 0x0, 0x8, 0xf6, 0x0, 0x3a, 0x18,
    0xfc, 0x0, 0x1, 0xff, 0x10, 0x7, 0xff, 0xfc,
    0x10, 0x0, 0x6f, 0xa0, 0x0, 0x3, 0xdf, 0xc1,
    0x0, 0x0, 0x42, 0x0, 0x0, 0x0, 0xaf, 0x50,
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x20, 0x0,
    0x0,

    /* U+591C "夜" */
    0x0, 0x0, 0x0, 0x28, 0x0, 0x0, 0x0, 0x0,
    0x0, 0x0, 0x8, 0xf8, 0x0, 0x0, 0x0, 0x2f,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x21, 0x99,
    0xaf, 0xb9, 0x9f, 0xc9, 0x99, 0x91, 0x0, 0x8,
    0xf7, 0x4, 0xfb, 0x0, 0x0, 0x0, 0x2, 0xfe,
    0x10, 0xcf, 0xff, 0xff, 0xb0, 0x0, 0xcf, 0x70,
    0x7f, 0xb9, 0x8a, 0xf9, 0x0, 0xaf, 0xf6, 0x6f,
    0xf6, 0xf6, 0xaf, 0x20, 0x7f, 0xff, 0x8f, 0xef,
    0x78, 0x9f, 0xa0, 0x0, 0x86, 0xf6, 0x31, 0xbf,
    0x6e, 0xf1, 0x0, 0x0, 0x5f, 0x60, 0x1, 0xef,
    0xf4, 0x0, 0x0, 0x5, 0xf6, 0x0, 0x8f, 0xff,
    0xc3, 0x0, 0x0, 0x5f, 0x79, 0xff, 0xc3, 0x9f,
    0xfd, 0x30, 0x5, 0xf6, 0x6c, 0x50, 0x0, 0x3a,
    0xb0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
    0x0,

    /* U+5F00 "开" */
    0x9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x10,
    0x6a, 0xae, 0xfb, 0xaa, 0xcf, 0xda, 0xa0, 0x0,
    0x0, 0xbf, 0x20, 0x6, 0xf7, 0x0, 0x0, 0x0,
    0xb, 0xf2, 0x0, 0x6f, 0x70, 0x0, 0x0, 0x0,
    0xbf, 0x20, 0x6, 0xf7, 0x0, 0x0, 0xaa, 0xae,
    0xfb, 0xaa, 0xcf, 0xda, 0xa5, 0x1f, 0xff, 0xff,
    0xff, 0xff, 0xff, 0xff, 0x80, 0x0, 0x1f, 0xe0,
    0x0, 0x7f, 0x70, 0x0, 0x0, 0x4, 0xfb, 0x0,
    0x6, 0xf7, 0x0, 0x0, 0x0, 0xcf, 0x50, 0x0,
    0x6f, 0x70, 0x0, 0x0, 0x9f, 0xd0, 0x0, 0x6,
    0xf7, 0x0, 0x0, 0xbf, 0xf2, 0x0, 0x0, 0x6f,
    0x70, 0x0, 0x3, 0xc2, 0x0, 0x0, 0x6, 0xf7,
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
    0x0,

    /* U+5F26 "弦" */
    0x0, 0x0, 0x0, 0x0, 0x17, 0x20, 0x0, 0x2,
    0xff, 0xff, 0x30, 0x3, 0xfb, 0x0, 0x0, 0x19,
    0x9c, 0xf6, 0x77, 0x7e, 0xf7, 0x77, 0x20, 0x0,
    0x7f, 0x9f, 0xff, 0xff, 0xff, 0xf4, 0xe, 0xff,
    0xf3, 0x0, 0xbf, 0x30, 0x0, 0x0, 0xfd, 0xaa,
    0x20, 0x5f, 0x70, 0x7c, 0x20, 0xf, 0x80, 0x0,
    0x2e, 0xc0, 0x2f, 0xe1, 0x0, 0xfb, 0x77, 0x1e,
    0xff, 0xff, 0xf4, 0x0, 0x1f, 0xff, 0xf2, 0xac,
    0xbe, 0xf8, 0x0, 0x0, 0x0, 0x8f, 0x10, 0x6,
    0xfa, 0x57, 0x0, 0x0, 0x9, 0xf0, 0x5, 0xfb,
    0x9, 0xf4, 0x0, 0x0, 0xbe, 0x6, 0xfe, 0x55,
    0x8f, 0xc0, 0x8, 0xbf, 0xb3, 0xff, 0xff, 0xff,
    0xff, 0x30, 0x7f, 0xd4, 0xa, 0x86, 0x53, 0x14,
    0xc3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
    0x0,

    /* U+6708 "月" */
    0x0, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xd0, 0x1,
    0xff, 0xbb, 0xbb, 0xbc, 0xfd, 0x0, 0x1f, 0xc0,
    0x0, 0x0, 0x1f, 0xd0, 0x1, 0xfe, 0xaa, 0xaa,
    0xaa, 0xfd, 0x0, 0x1f, 0xff, 0xff, 0xff, 0xff,
    0xd0, 0x2, 0xfc, 0x0, 0x0, 0x1, 0xfd, 0x0,
    0x3f, 0xb0, 0x0, 0x0, 0x1f, 0xd0, 0x5, 0xff,
    0xff, 0xff, 0xff, 0xfd, 0x0, 0x9f, 0xdc, 0xcc,
    0xcc, 0xcf, 0xd0, 0xe, 0xf2, 0x0, 0x0, 0x1,
    0xfd, 0x7, 0xfc, 0x0, 0x0, 0x0, 0x1f, 0xc4,
    0xff, 0x30, 0x0, 0x1d, 0xde, 0xfb, 0xa, 0x60,
    0x0, 0x0, 0xaf, 0xec, 0x30, 0x0, 0x0, 0x0,
    0x0, 0x0, 0x0,

    /* U+6CE2 "波" */
    0x0, 0xa3, 0x0, 0x0, 0x1f, 0xb0, 0x0, 0x0,
    0x5f, 0xf9, 0x0, 0x1, 0xfb, 0x0, 0x0, 0x0,
    0x4d, 0x97, 0xbb, 0xbf, 0xeb, 0xbb, 0x50, 0x0,
    0x0, 0xaf, 0xff, 0xff, 0xff, 0xf6, 0x5, 0x10,
    0xa, 0xf1, 0x1f, 0xb0, 0xbf, 0x13, 0xff, 0x90,
    0xaf, 0x11, 0xfb, 0x7, 0x70, 0x4, 0xdc, 0xa,
    0xff, 0xff, 0xff, 0xf8, 0x0, 0x0, 0x10, 0xbf,
    0xfe, 0x99, 0xcf, 0x60, 0x0, 0x6, 0xc, 0xea,
    0xf3, 0xc, 0xf1, 0x0, 0x4, 0xf7, 0xec, 0x2f,
    0xd6, 0xf9, 0x0, 0x0, 0xcf, 0x4f, 0xa0, 0x7f,
    0xfe, 0x10, 0x0, 0x4f, 0xb6, 0xf6, 0x6, 0xff,
    0xd3, 0x0, 0xd, 0xf3, 0xcf, 0x7c, 0xfe, 0xaf,
    0xfb, 0x40, 0x8b, 0x1c, 0xa8, 0xfa, 0x10, 0x4c,
    0xf3, 0x0, 0x0, 0x1, 0x2, 0x0, 0x0, 0x2,
    0x0,

    /* U+6E90 "源" */
    0x1, 0x70, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
    0x8f, 0xe4, 0xff, 0xff, 0xff, 0xff, 0xf5, 0x0,
    0x6e, 0x3f, 0xe9, 0x9d, 0xda, 0x99, 0x30, 0x0,
    0x0, 0xfb, 0x0, 0xdf, 0x30, 0x0, 0x5, 0x10,
    0xf, 0xbd, 0xff, 0xff, 0xfe, 0x4, 0xff, 0x70,
    0xfa, 0xdb, 0x33, 0x3c, 0xe0, 0x5, 0xe7, 0x1f,
    0xad, 0xff, 0xff, 0xfe, 0x0, 0x1, 0x2, 0xf9,
    0xdb, 0x33, 0x3c, 0xe0, 0x0, 0x43, 0x4f, 0x7d,
    0xff, 0xff, 0xfe, 0x0, 0xc, 0xf8, 0xf5, 0x45,
    0xbf, 0x66, 0x60, 0x3, 0xfb, 0xbf, 0x2d, 0xba,
    0xf4, 0xfa, 0x0, 0xaf, 0x5f, 0xd7, 0xf5, 0xaf,
    0x1b, 0xf4, 0x2f, 0xd8, 0xf7, 0xab, 0x8d, 0xf0,
    0x3d, 0x50, 0x55, 0x4c, 0x0, 0xb, 0xe9, 0x0,
    0x0,

    /* U+793A "示" */
    0x0, 0x9c, 0xcc, 0xcc, 0xcc, 0xcc, 0x90, 0x0,
    0xc, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x0, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f, 0xff,
    0xff, 0xff, 0xff, 0xff, 0xff, 0x21, 0xbb, 0xbb,
    0xbd, 0xfd, 0xbb, 0xbb, 0xb2, 0x0, 0x1, 0x0,
    0x6f, 0x80, 0x3, 0x0, 0x0, 0x6, 0xf9, 0x6,
    0xf8, 0xa, 0xf5, 0x0, 0x0, 0xef, 0x30, 0x6f,
    0x80, 0x3f, 0xe1, 0x0, 0xaf, 0xa0, 0x6, 0xf8,
    0x0, 0x9f, 0x90, 0x5f, 0xd0, 0x0, 0x6f, 0x80,
    0x1, 0xff, 0x10, 0x42, 0xb, 0xdf, 0xf6, 0x0,
    0x6, 0x20, 0x0, 0x0, 0x7f, 0xea, 0x10, 0x0,
    0x0, 0x0,

    /* U+7B14 "笔" */
    0x0, 0x69, 0x10, 0x0, 0x5a, 0x20, 0x0, 0x0,
    0xe, 0xf8, 0x77, 0x1d, 0xf9, 0x77, 0x71, 0x8,
    0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0x34, 0xfd,
    0x5f, 0x74, 0xfe, 0x1d, 0xe0, 0x0, 0x9, 0x30,
    0xa5, 0x7, 0x53, 0x9b, 0x70, 0x0, 0x2c, 0xdd,
    0xef, 0xff, 0xff, 0xfe, 0x10, 0x0, 0xaa, 0xa9,
    0xfe, 0x64, 0x31, 0x10, 0x0, 0x37, 0x89, 0xaf,
    0xfd, 0xef, 0xff, 0x0, 0x6, 0xff, 0xed, 0xfe,
    0x98, 0x76, 0x50, 0x0, 0x0, 0x1, 0x3f, 0xd6,
    0x78, 0x9b, 0xc1, 0x2e, 0xff, 0xff, 0xff, 0xff,
    0xfe, 0xdc, 0x21, 0xa9, 0x76, 0x5f, 0xd2, 0x10,
    0x9, 0x60, 0x0, 0x0, 0x0, 0xff, 0x98, 0x89,
    0xfc, 0x0, 0x0, 0x0, 0x6, 0xef, 0xff, 0xfd,
    0x40,

    /* U+7B2C "第" */
    0x0, 0x36, 0x10, 0x0, 0x27, 0x20, 0x0, 0x0,
    0xb, 0xf7, 0x55, 0x29, 0xf9, 0x55, 0x51, 0x5,
    0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0x43, 0xfd,
    0x1d, 0xe0, 0xdf, 0x35, 0xf9, 0x0, 0x7, 0xa8,
    0xbb, 0x8a, 0xd8, 0x8d, 0x80, 0x0, 0x3f, 0xff,
    0xff, 0xff, 0xff, 0xfd, 0x0, 0x0, 0x23, 0x33,
    0xbf, 0x43, 0x3f, 0xd0, 0x0, 0xc, 0xff, 0xff,
    0xff, 0xff, 0xfd, 0x0, 0x0, 0xdd, 0x33, 0xbf,
    0x43, 0x33, 0x20, 0x0, 0xf, 0xff, 0xff, 0xff,
    0xff, 0xff, 0x80, 0x1, 0x88, 0xbf, 0xff, 0x98,
    0x8b, 0xf7, 0x0, 0x0, 0x7f, 0xed, 0xf1, 0x0,
    0x8f, 0x50, 0x18, 0xef, 0xa1, 0xaf, 0x17, 0xef,
    0xf1, 0x0, 0xaa, 0x30, 0xa, 0xf1, 0x3b, 0xa5,
    0x0
};


/*---------------------
 *  GLYPH DESCRIPTION
 *--------------------*/

static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
    {.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
    {.bitmap_index = 0, .adv_w = 240, .box_w = 15, .box_h = 13, .ofs_x = 0, .ofs_y = -1},
    {.bitmap_index = 98, .adv_w = 240, .box_w = 15, .box_h = 15, .ofs_x = 0, .ofs_y = -1},
    {.bitmap_index = 211, .adv_w = 240, .box_w = 15, .box_h = 15, .ofs_x = 0, .ofs_y = -2},
    {.bitmap_index = 324, .adv_w = 240, .box_w = 15, .box_h = 15, .ofs_x = 0, .ofs_y = -2},
    {.bitmap_index = 437, .adv_w = 240, .box_w = 15, .box_h = 15, .ofs_x = 0, .ofs_y = -2},
    {.bitmap_index = 550, .adv_w = 240, .box_w = 15, .box_h = 14, .ofs_x = 0, .ofs_y = -2},
    {.bitmap_index = 655, .adv_w = 240, .box_w = 15, .box_h = 15, .ofs_x = 0, .ofs_y = -2},
    {.bitmap_index = 768, .adv_w = 240, .box_w = 13, .box_h = 14, .ofs_x = 0, .ofs_y = -2},
    {.bitmap_index = 859, .adv_w = 240, .box_w = 15, .box_h = 15, .ofs_x = 0, .ofs_y = -2},
    {.bitmap_index = 972, .adv_w = 240, .box_w = 15, .box_h = 14, .ofs_x = 0, .ofs_y = -1},
    {.bitmap_index = 1077, .adv_w = 240, .box_w = 15, .box_h = 13, .ofs_x = 0, .ofs_y = -1},
    {.bitmap_index = 1175, .adv_w = 240, .box_w = 15, .box_h = 14, .ofs_x = 0, .ofs_y = -1},
    {.bitmap_index = 1280, .adv_w = 240, .box_w = 15, .box_h = 14, .ofs_x = 0, .ofs_y = -1}
};

/*---------------------
 *  CHARACTER MAPPING
 *--------------------*/

static const uint16_t unicode_list_0[] = {
    0x0, 0x1f, 0x52, 0x3ac, 0xb11, 0x10f5, 0x111b, 0x18fd,
    0x1ed7, 0x2085, 0x2b2f, 0x2d09, 0x2d21
};

/*Collect the unicode lists and glyph_id offsets*/
static const lv_font_fmt_txt_cmap_t cmaps[] =
{
    {
        .range_start = 19979, .range_length = 11554, .glyph_id_start = 1,
        .unicode_list = unicode_list_0, .glyph_id_ofs_list = NULL, .list_length = 13, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
    }
};



/*--------------------
 *  ALL CUSTOM DATA
 *--------------------*/

#if LV_VERSION_CHECK(8, 0, 0)
/*Store all the custom data of the font*/
static  lv_font_fmt_txt_glyph_cache_t cache;
static const lv_font_fmt_txt_dsc_t font_dsc = {
#else
static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
    .glyph_bitmap = glyph_bitmap,
    .glyph_dsc = glyph_dsc,
    .cmaps = cmaps,
    .kern_dsc = NULL,
    .kern_scale = 0,
    .cmap_num = 1,
    .bpp = 4,
    .kern_classes = 0,
    .bitmap_format = 0,
#if LV_VERSION_CHECK(8, 0, 0)
    .cache = &cache
#endif
};


/*-----------------
 *  PUBLIC FONT
 *----------------*/

/*Initialize a public general font descriptor*/
#if LV_VERSION_CHECK(8, 0, 0)
const lv_font_t lv_font_test = {
#else
lv_font_t lv_font_test = {
#endif
    .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt,    /*Function pointer to get glyph's data*/
    .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt,    /*Function pointer to get glyph's bitmap*/
    .line_height = 16,          /*The maximum line height required by the font*/
    .base_line = 2,             /*Baseline measured from the bottom of the line*/
#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0)
    .subpx = LV_FONT_SUBPX_NONE,
#endif
#if LV_VERSION_CHECK(7, 4, 0) || LVGL_VERSION_MAJOR >= 8
    .underline_position = -2,
    .underline_thickness = 1,
#endif
    .dsc = &font_dsc           /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};



#endif /*#if LV_FONT_TEST*/

